package com.example.demo.model;

import jakarta.persistence.*;

@Entity
@Table(name = "user_level")
public class UserLevel {
    @Id
    @Column(name = "user_id")
    private Long userId; // 用户ID

    @Column(name = "level", nullable = false)
    private int level; // 用户等级

    @Column(name = "share_rate", nullable = false)
    private float shareRate; // 分享率

    @Column(name = "filesize", nullable = false)
    private float downloadedFileSize; // 下载量

    public UserLevel() {}

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public float getShareRate() {
        return shareRate;
    }

    public void setShareRate(float shareRate) {
        this.shareRate = shareRate;
    }

    public float getDownloadedFileSize() {
        return downloadedFileSize;
    }

    public void setDownloadedFileSize(float downloadedFileSize) {
        this.downloadedFileSize = downloadedFileSize;
    }
}
